﻿
<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPages/admin.master" AutoEventWireup="true"  CodeFile="KhachHangDuthuong.aspx.cs" Inherits="KhachHangDuthuong" Title="KhachHangDuthuong List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">Khach Hang Duthuong List</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
		<data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1" PersistenceMethod="Session" />
		<br />
		<data:EntityGridView ID="GridView1" runat="server"			
				AutoGenerateColumns="False"					
				OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
				DataSourceID="KhachHangDuthuongDataSource"
				DataKeyNames="Id"
				AllowMultiColumnSorting="false"
				DefaultSortColumnName="" 
				DefaultSortDirection="Ascending"	
				ExcelExportFileName="Export_KhachHangDuthuong.xls"  		
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" ShowEditButton="True" />				
				<asp:BoundField DataField="Id" HeaderText="Id" SortExpression="ID" ReadOnly />
				<asp:BoundField DataField="HoiVienId" HeaderText="Hoi Vien Id" SortExpression="HoiVienID"  />
				<asp:BoundField DataField="Duration" HeaderText="Duration" SortExpression="Duration"  />
				<asp:BoundField DataField="StartDate" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Start Date" SortExpression="StartDate"  />
				<asp:BoundField DataField="EndDate" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="End Date" SortExpression="EndDate"  />
				<data:HyperLinkField HeaderText="Brand Id" DataNavigateUrlFormatString="ThuongHieuEdit.aspx?BrandId={0}" DataNavigateUrlFields="BrandId" DataContainer="BrandIdSource" DataTextField="BrandName" />
				<data:BoundRadioButtonField DataField="IsActive" HeaderText="Is Active" SortExpression="[IsActive]"  />
				<data:HyperLinkField HeaderText="Chuong Trinh Id" DataNavigateUrlFormatString="ChuongTrinhEdit.aspx?ChuongTrinhId={0}" DataNavigateUrlFields="ChuongTrinhId" DataContainer="ChuongTrinhIdSource" DataTextField="TenChuongTrinh" />
				<asp:BoundField DataField="LoaiSanPham" HeaderText="Loai San Pham" SortExpression="LoaiSanPham"  />
				<asp:BoundField DataField="MucChietKhauTd" HeaderText="Muc Chiet Khau Td" SortExpression="MucChietKhauTD"  />
				<asp:BoundField DataField="MucChietKhauCc" HeaderText="Muc Chiet Khau Cc" SortExpression="MucChietKhauCC"  />
				<asp:BoundField DataField="UpdatedDate" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Updated Date" SortExpression="UpdatedDate"  />
				<asp:BoundField DataField="UpdatedBy" HeaderText="Updated By" SortExpression="UpdatedBy"  />
				<data:HyperLinkField HeaderText="Phan Thuong Id" DataNavigateUrlFormatString="PhanThuongEdit.aspx?Id={0}" DataNavigateUrlFields="Id" DataContainer="PhanThuongIdSource" DataTextField="Name" />
				<asp:BoundField DataField="SoBienBan" HeaderText="So Bien Ban" SortExpression="SoBienBan"  />
				<asp:BoundField DataField="NgayKyBienBan" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Ngay Ky Bien Ban" SortExpression="NgayKyBienBan"  />
			</Columns>
			<EmptyDataTemplate>
				<b>No KhachHangDuthuong Found!</b>
			</EmptyDataTemplate>
		</data:EntityGridView>
		<br />
		<asp:Button runat="server" ID="btnKhachHangDuthuong" OnClientClick="javascript:location.href='KhachHangDuthuongEdit.aspx'; return false;" Text="Add New"></asp:Button>
		<data:KhachHangDuthuongDataSource ID="KhachHangDuthuongDataSource" runat="server"
			SelectMethod="GetPaged"
			EnablePaging="True"
			EnableSorting="True"
			EnableDeepLoad="True"
			>
			<DeepLoadProperties Method="IncludeChildren" Recursive="False">
	            <Types>
					<data:KhachHangDuthuongProperty Name="ChuongTrinh"/> 
					<data:KhachHangDuthuongProperty Name="ThuongHieu"/> 
					<data:KhachHangDuthuongProperty Name="PhanThuong"/> 
				</Types>
			</DeepLoadProperties>
			<Parameters>
				<data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
				<asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
				<asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
				<data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
			</Parameters>
		</data:KhachHangDuthuongDataSource>
	    		
</asp:Content>



